@use "theme";
@use "transition";
@use "element-plus";
@use "sidebar";
@use "dark";

/* 自定义全局 CssVar */
:root {
  /* 左侧菜单展开、收起动画时长 */
  --pure-transition-duration: 0.3s;

  /* 常用border-color 需要时可取用 */
  --pure-border-color: rgb(5 5 5 / 6%);

  /* switch关闭状态下的color 需要时可取用 */
  --pure-switch-off-color: #a6a6a6;

  /** 主题色 */
  --pure-theme-sub-menu-active-text: initial;
  --pure-theme-menu-bg: none;
  --pure-theme-menu-hover: none;
  --pure-theme-sub-menu-bg: transparent;
  --pure-theme-menu-text: initial;
  --pure-theme-sidebar-logo: none;
  --pure-theme-menu-title-hover: initial;
  --pure-theme-menu-active-before: transparent;
}

/* 灰色模式 */
.html-grey {
  filter: grayscale(100%);
}

/* 色弱模式 */
.html-weakness {
  filter: invert(80%);
}

.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.flex-row-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.flex-row-space {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.flex-column-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flex-row-wrap {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}

@keyframes shake {
  0% {
    transform: translate(0, 0);
  }

  10%,
  90% {
    transform: translate(-1px, 0);
  }

  20%,
  80% {
    transform: translate(2px, 0);
  }

  30%,
  50%,
  70% {
    transform: translate(-4px, 0);
  }

  40%,
  60% {
    transform: translate(4px, 0);
  }

  100% {
    transform: translate(0, 0);
  }
}

.shake {
  animation: shake 1.2s ease-in-out infinite; /* 使用更平滑的缓动函数 */
}

/* 公共弹窗显示样式 */
.youdoDialog {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
  color: #333;
  background-color: rgb(51 51 51 / 40%);

  /* 内容容器 */
  .youdoDialogMain {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    width: 560px;
    background-color: #fff;
    border-radius: 4px;
    transform: translate(-50%, -50%);

    /* 标题 */
    .titleInfo {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      padding: 12px;
      font-size: 12px;
      border-bottom: 1px solid rgb(224 229 239 / 100%);

      .close {
        font-weight: bold;
        cursor: pointer;
      }
    }

    .youdoContents {
      display: flex;
      flex-direction: column;
      padding: 12px;
      margin-top: 15px;
      margin-bottom: 15px;

      .contentsItem {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding-right: 10px;
        padding-left: 10px;
        margin-bottom: 10px;

        &.center {
          align-items: center;
        }

        .leftInfo {
          width: 90px;
          font-size: 13px;
          text-align: right;

          i {
            padding-right: 4px;
            font-style: normal;
            color: red;
          }
        }

        .rightInfo {
          width: calc(100% - 90px);
        }
      }

      .el-row {
        margin-bottom: 18px;
      }
    }

    /* 底部按钮 */
    .youdoFooter {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      padding: 12px;
      margin-bottom: 6px;

      .btn {
        display: inline-block;
        padding: 6px 24px;
        margin-right: 20px;
        font-size: 13px;
        cursor: pointer;
        border: 1px solid #d7d7d7;
        border-radius: 4px;

        &:last-child {
          margin-right: 0;
        }

        &.blue {
          color: #fff;
          background-color: #5284ff;
          border: 1px solid #5284ff;
        }
      }
    }
  }
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  background-color: #ddd;
}

::-webkit-scrollbar-thumb {
  background-color: #999;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #777;
}

/* 公共图片上传 */
.choiceImgInfo {
  .imgInfo {
    display: flex;
    align-items: center;
    margin-top: 12px;

    .imgItem {
      position: relative;
      float: left;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 120px;
      height: 120px;
      margin-right: 6px;
      margin-bottom: 6px;
      color: #dddfe6;
      cursor: pointer;

      /* background-color: #F2F6FC; */
      border: 1px dashed #dddfe6;
      border-radius: 4px;

      .tips {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 24px;
        line-height: 24px;
        color: #fff;
        text-align: center;
        background-color: #666;
      }

      .el-icon-plus {
        margin-bottom: 6px;
        font-size: 24px;
        color: #909399;
      }

      .el-icon-error {
        position: absolute;
        top: 4px;
        right: 4px;
        font-size: 15px;
        color: #909399;
        background-color: #fff;
        border-radius: 50%;
      }
    }
  }

  img {
    user-select: none;
  }
}

.fixedBottom {
  position: fixed;
  top: initial;
  bottom: 58px;
  left: 30%;
  z-index: 2000;
}
